const path = require('path')
const webpack = require('webpack')



function resolve(dir) {
  return path.join(__dirname, dir)
}
module.exports = {
    publicPath:"./",
    assetsDir: "static",
    outputDir:'dist',
    configureWebpack: () => {
        if (process.env.NODE_ENV === "production") {
          // 为生产环境修改配置...
        } else {
          // 为开发环境修改配置...
        }
      },
    chainWebpack: (config)=>{
        config.resolve.alias
            .set('@$', resolve('src'))
            .set('@assets',resolve('src/assets'))
            .set('@components',resolve('src/components'))
            .set('@layout',resolve('src/layout'))
            .set('@base',resolve('src/base'))
            .set('@static',resolve('src/static'))
    },
      devServer: {
        host: "0.0.0.0",
        port: 8080,
        https: false,
        hotOnly: true,
        proxy: {
          '/api': {
              target: 'http://test.lcsw.cn:8041/lcsw_pre',
              changeOrigin: true,
              ws: false,
              pathRewrite: {
                '^/api': ''
              }
          }
      },
        disableHostCheck: true
      },
    
}